home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group00b.txt
/
000106_icon-group-sender_Wed Oct 25 07:48:36 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-01-03
|
1KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id e9PElbT08852
for icon-group-addresses; Wed, 25 Oct 2000 07:47:37 -0700 (MST)
Message-Id: <200010251447.e9PElbT08852@baskerville.CS.Arizona.EDU>
Delivered-To: fixup-icon-group@CS.Arizona.EDU@fixme
Date: Tue, 24 Oct 2000 18:23:38 -0600
From: Cheyenne Wills <cheyenne_wills@qwest.net>
X-Accept-Language: en
To: icon-group@cs.arizona.edu
Subject: Re: How to "declare" a string? (and forget how to do it :)
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 835
Yesterday I posted a "solution" then posted a fix to that solution and
even that was wrong (thanks to those who pointed it out)
The original "fixed" code looked like:
procedure main()
repeat {
/count := 5
((10 >= count) +:= 2)| break
}
end
is wrong.
I had gotten my wires crossed with which operators produce values versus
those that produce variables.
The relationship operators ( =, <=, >=, etc.) produce values, while
operators such as ( /, \, op:=, etc.) produce variables.
So.. here is the final (hopefully) example..
procedure main()
repeat {
/count := 5
(count := (10 >= count) + 2) | break
}
end
Of course this is obscured code and could be written alot "cleaner"
Again sorry about the brain check. (and that should teach me to post
"untested" code <grin>)
Cheyenne